package cn.edu.xju.factory;

public abstract class StaticFactory {
    private StaticFactory(){}
    private String name;
    abstract void say();
    public static StaticFactory getInstance(){
        class Son extends StaticFactory{
            void say(){
                System.out.println("Son... say()...");
            }
        }
        return new Son();
    }

}
